import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:lepig/pages/webView/Web.dart';

class JumpUtil {
  JumpUtil(this.context,
      {this.jumpUrl,
      this.jumpName,
      this.jumpPositon,
      this.jumpKey,
      this.isLocal});

  BuildContext context;
  String jumpUrl;
  String jumpName;
  String jumpPositon;
  String jumpKey;
  String isLocal;

  go() {
    if (jumpKey == "ACTIVITY_H5" || jumpKey == "NH5") {
      Navigator.of(context).push(new MaterialPageRoute(builder: (_) {
        return new Web(
          title: jumpName,
          url: jumpUrl,
        );
      }));
    }
  }
}
